using GameFramework.DataTable;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityGameFramework.Runtime;

namespace Adventure
{
    public static class GetDataTableExtension 
    {
        public static DRPlayer GetDRPlayer(this DataTableComponent  dataTableComponent, int playerId)
        {
            IDataTable<DRPlayer> dtPlayer = GameEntry.DataTable.GetDataTable<DRPlayer>();
            DRPlayer dRPlayer = dtPlayer.GetDataRow(playerId);
            return dRPlayer;
        }

        public static DREnemy GetDREnemy(this DataTableComponent dataTableComponent, int enemyId)
        {
            IDataTable<DREnemy> dtEnemy = GameEntry.DataTable.GetDataTable<DREnemy>();
            DREnemy dREnemy = dtEnemy.GetDataRow(enemyId);
            return dREnemy;
        }
    }
}